
<script type="text/javascript">
	function check()
	{
		re=/^\s*$/;
		if(re.test(formthem.tieude.value))
		{
			alert("Tiêu đề không được để trống");
			return false;
		}

	}
</script>
<!-- /TinyMCE -->
<?
	$sql = "SELECT * FROM lienketwebsite ORDER BY thutu ASC";
	$result = mysql_query($sql) or die("Can not query thutu lienketwebsite".mysql_error($conn));				
	$count = mysql_num_rows($result);	
?>
<div id="bang">
<form name="formthem" method="post" action="?go=lienketwebsite&action=add&count=<?=($count+1)?>"  enctype="multipart/form-data" onsubmit="return check();" >
	<table border="1px"  bordercolor="#CCCCCC" cellpadding="0px" cellspacing="2px" cols="2" width="790px">
    	<tr>
        	<td width="20%" align="right" style="padding-right:5px"> Tiêu đề </td>
            <td width="80%"><input name="tieude" type="text" style="width:80%" /></td>
        </tr>
<!--        <tr>
        	<td align="right" style="padding-right:5px"> Thời gian </td>
            <td><input name="thoigian" type="text" /></td>
        </tr>	-->
        <tr>
			<td align="right" style="padding-right:5px">Liên Kết </td>
            <td width="80%">http://<input name="lienket" type="text" style="width:80%" /></td>
		</tr>
        <tr>
        	<td align="right" style="padding-right:5px">Thứ Tự </td>
            <td width="80%">
	            <select name="thutu">
               	<?					
				 for ($i = 1; $i<=10; $i++) {
				?>
                	<option value="<?=$i?>"> <?=$i?></option>
                <?
					}
				?>
                </select>
            </td>	
        </tr>
        <tr>
        	<td align="right" style="padding-right:5px"> Trạng thái </td>
            <td>
            	<select name="trangthai">
                	<option value="1" selected="selected"> Hoạt Động </option>
                    <option value="0"> Không Hoạt Động </option>
                </select>
             </td>
        </tr>
        <tr>
        	<td></td>
            <td><input type="submit" value=" Thêm " name="Submit"/><input type="button" onClick="location='?go=lienketwebsite&action=view&page=1'" value=" Quay Lại "/></td>
        </tr>
    </table>
    </form>
</div>
<div class="clear"></div>
</div>